#!/usr/bin/env python3

import rospy
from DrEmpower_can.msg import angle_speed_torque_states
# import DrEmpower as dr

def callback(data):
    import DrEmpower as dr
    angle_speed_torque = dr.angle_speed_torque_states(id_list=data.id_list)
    if angle_speed_torque is None:
        pass
    else:
        print(angle_speed_torque)
    rospy.loginfo("angle_speed_torque_states_node")


def listener():
    rospy.init_node("angle_speed_torque_states", anonymous=True)
    rospy.Subscriber("angle_speed_torque_states", angle_speed_torque_states, callback)
    rospy.spin()


if __name__ == '__main__':
    listener()
